$(function(){
	$("#submit").click(function(){
		$.post(contextpath + "reportData",  $("#query").serializeObject(), function(result){
			$("#allAmount").text(result.allAmount);
			$("#allRebate").text(result.allRebate);
			$("#allWaitWithdrawRebate").text(result.allWaitWithdrawRebate);
			$("#allWithdrawRebate").text(result.allWithdrawRebate);
		});
	});
	
	
	 $('#beginDate').daterangepicker(
			  { 
				  "singleDatePicker": true,
			    locale:{
			    	format: 'YYYY-MM-DD',
		            applyLabel: '确认',
		            cancelLabel: '取消',
		            fromLabel: '从',
		            toLabel: '到',
		            customRangeLabel: '选择时间',
		            daysOfWeek:["日","一","二","三","四","五","六"],
		            monthNames: ["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],
		        }
			  }
			);
	 $('#beginDate').val("");
	 
	 
	 $('#endDate').daterangepicker(
			  { 
				  "singleDatePicker": true,
			    locale:{
			    	format: 'YYYY-MM-DD',
		            applyLabel: '确认',
		            cancelLabel: '取消',
		            fromLabel: '从',
		            toLabel: '到',
		            customRangeLabel: '选择时间',
		            daysOfWeek:["日","一","二","三","四","五","六"],
		            monthNames: ["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],
		        }
			  }
			);
	 
	 $('#endDate').val("");
	 
	 
	 $("#submit").click();
	 
	 $(function () { $("[data-toggle='tooltip']").tooltip(); });
});

